﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GalaSoft.MvvmLight;
using MusicExplorer.Data.Entities;
using MusicExplorer.Internals;
using MusicExplorer.ViewModel;

namespace MusicExplorer.Wrappers
{
    public class DetailTreeItemWrapper : ViewModelBase,
        IHaveDisplayName
    {
        private readonly IDetailEntity m_entity;

        public DetailTreeItemWrapper(IDetailEntity entity)
        {
            m_entity = entity;
        }

        public IDetailEntity Entity { get { return m_entity; } }

        public string DisplayName { get { return Entity.DisplayName; } }

        private bool m_isSelected;
        public bool IsSelected
        {
            get { return m_isSelected; }
            set
            {
                if (m_isSelected != value)
                {
                    m_isSelected = value;
                    RaisePropertyChanged("IsSelected");
                }
            }
        }
    }
}
